<template>
  <div class="town_box" :style="`background-image: url('${pic.imgurl1}');`">
    <div class="town_top">
      <div class="top_left" style="cursor: pointer;" @click="gohome">
        <img :src="pic.imgurl2" alt="">
        <span>回到首页</span>
      </div>
      <h3>一体化应用决策分析中心-{{ title }}</h3>
      <div class="top_right">
        <img :src="pic.imgurl3" alt="">
        <span>浙江省-绍兴市-越城区-{{ title }}</span>
      </div>
    </div>
    <div class="town_bot" style="height:90.5%">
      <town-bot />
    </div>
  </div>
</template>
<script>
import TownBot from './components/TownBot.vue';
export default {
  components: {
    TownBot
  },
  data() {
    return {
      title: '',
      pic: {
        imgurl1: require('@/assets/img/townPreview/背景.png'),
        imgurl2: require('@/assets/img/townPreview/回到首页.png'),
        imgurl3: require('@/assets/img/townPreview/定位.png')
      }
    };
  },
  created() {
    this.title = this.$route.query.ENTERPRISENAME;
  },
  methods: {
    gohome() {
      this.$router.push('/');
    }
  }
};
</script>
<style lang="scss" scoped>
.town_box {
  height: 100%;
  background-repeat: no-repeat;
  padding: 0 24px;
  background-size: 100% calc(100% + 72px);
}
.town_top {
  height: 9.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .top_left {
    border: 1px solid #1fd2ff;
    border-radius: 9px;
    padding: 6px 50px;
    img {
      vertical-align: middle;
    }
    span {
      color: #1fd2ff;
      display: inline-block;
      vertical-align: middle;
      font-size: 16px;
    }
  }
  h3 {
    color: #1fd2ff;
    font-size: 32px;
    margin: 0;
  }
  .top_right {
    margin-left: 16px;
    vertical-align: middle;

    span {
      color: #1fd2ff;
      font-size: 18px;
      display: inline-block;
      vertical-align: middle;

    }
  }
}
</style>
